
Page({
  data: {
    phoneCode:3
  },
  onLoad: function (options) {
    let time = setInterval(() => {
      let phoneCode = this.data.phoneCode
      phoneCode--
      this.setData({
        phoneCode: phoneCode
      })
      if (phoneCode == 0) {
        wx.switchTab({
          url: '../index/index',
        })
        clearInterval(this.time) 
      }
    }, 1000)

  },
  toIndexHandle(){
    wx.switchTab({
      url: '../index/index',
    })
    clearInterval(this.time) 
  },
  
})